// 方法数据
const dataFn = (re) => {
  let obj = {}
  let data = []
  let ind = 0
  let inds = 0
  re.forEach((item, inde) => {
    ind = 0
    data.forEach(itemx => {
      if (obj.name === itemx.name) {
        inds = 0
        obj = {}
      }
    })
    if (inds === 1) data.push(obj)
    inds = 0
    obj = {}
    const cen = item.img_s
    re.forEach(itemy => {
      const ceny = itemy.img_s
      if (cen === ceny) {
        ind++
        if (ind === 1) {

          inds = 1
          obj.name = itemy.img_s
          obj.mark = itemy.img_remark
          obj.Logo = itemy.img_s
          obj.id = itemy.img_id
          obj.imgList = []

        }

        obj.imgList.push(itemy.img_url)
      }
      data.forEach(itemx => {
        if (obj.name === itemx.name) {
          inds = 0
        }
      })
      if (inds === 1) data.push(obj)

    })
  })

  data.forEach(item => {
    item.name.indexOf('')
  })
  return data
}

module.exports = dataFn